package ui.activity.profit.presenter;

import javax.inject.Inject;

import base.BaseBiz;
import ui.activity.profit.biz.CustomerBiz;
import ui.activity.profit.contract.CustomerContract;

/**
 * Created by chenjian on 19/2/26
 */

public class CustomerPresenter implements CustomerContract.Presenter {

    CustomerContract.View view;
    CustomerBiz customerBiz;


    @Inject
    public CustomerPresenter(CustomerContract.View view) {
        this.view = view;
    }


    @Override
    public void setBiz(BaseBiz biz) {
        customerBiz = (CustomerBiz) biz;
    }


    @Override
    public void getInfo() {
//        view.loading(true);
//        customerBiz.getOnLine(new BaseBiz.Callback<OnLineBean>() {
//            @Override
//            public void onSuccess(OnLineBean info) {
//                view.upDateUI(info);
//                view.loading(false);
//            }
//
//            @Override
//            public void onFailure(OnLineBean info) {
//                view.loading(false);
//            }
//        });
    }

    @Override
    public void getMessageState(String sign) {
//        view.loading(true);
//        String url = RetrofitHelp2.BASE_URL + "/receive/" + sign;
//        customerBiz.receiveMessage(url, new BaseBiz.Callback<Boolean>() {
//            @Override
//            public void onSuccess(Boolean info) {
////                view.loading(false);
//            }
//
//            @Override
//            public void onFailure(Boolean info) {
////                view.loading(false);
//            }
//        });
    }

    @Override
    public void getReadMessage(String sign) {
//        String url = RetrofitHelp2.BASE_URL + "customer/unread/" + sign;
//        customerBiz.getUnreadMessage(url, new BaseBiz.Callback<List<MessageReadBean>>() {
//            @Override
//            public void onSuccess(List<MessageReadBean> info) {
//                view.upDataMessage(info);
////                view.loading(false);
//            }
//
//            @Override
//            public void onFailure(List<MessageReadBean> info) {
////                view.loading(false);
//            }
//        });
    }


}
